// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_REP_PRODUCT_REGISTER
// * CreateDate    : 2014-06-05 18:30:33
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:33
// * LastChanger   : 2014-06-05 18:30:33
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class RepProductRegisterEntity : EntityBase
    {
        public RepProductRegisterTable TableSchema
        {
            get
            {
                return RepProductRegisterTable.Current;
            }
		}
		
		public RepProductRegisterEntity()
        {

        }
		
		public RepProductRegisterEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.RegisterId = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.ContactId = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_ID"]));
			this.RegisterCode = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_CODE"]));
			this.RegisterDepartment = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_DEPARTMENT"]));
			this.RegisterPerson = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_PERSON"]));
			this.RegisterDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["REGISTER_DATE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public RepProductRegisterEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.RegisterId = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.ContactId = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_ID"]));
			this.RegisterCode = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_CODE"]));
			this.RegisterDepartment = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_DEPARTMENT"]));
			this.RegisterPerson = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_PERSON"]));
			this.RegisterDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["REGISTER_DATE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return RepProductRegisterTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string RegisterId
        {
            get { return Convert.ToString(GetData(RepProductRegisterTable.C_REGISTER_ID)); }
            set { SetData(RepProductRegisterTable.C_REGISTER_ID, value); }
        }
		
        [DataMember]
        public string SupplierId
        {
            get { return Convert.ToString(GetData(RepProductRegisterTable.C_SUPPLIER_ID)); }
            set { SetData(RepProductRegisterTable.C_SUPPLIER_ID, value); }
        }
		
        [DataMember]
        public string CustomerId
        {
            get { return Convert.ToString(GetData(RepProductRegisterTable.C_CUSTOMER_ID)); }
            set { SetData(RepProductRegisterTable.C_CUSTOMER_ID, value); }
        }
		
        [DataMember]
        public string ContactId
        {
            get { return Convert.ToString(GetData(RepProductRegisterTable.C_CONTACT_ID)); }
            set { SetData(RepProductRegisterTable.C_CONTACT_ID, value); }
        }
		
        [DataMember]
        public string RegisterCode
        {
            get { return Convert.ToString(GetData(RepProductRegisterTable.C_REGISTER_CODE)); }
            set { SetData(RepProductRegisterTable.C_REGISTER_CODE, value); }
        }
		
        [DataMember]
        public string RegisterDepartment
        {
            get { return Convert.ToString(GetData(RepProductRegisterTable.C_REGISTER_DEPARTMENT)); }
            set { SetData(RepProductRegisterTable.C_REGISTER_DEPARTMENT, value); }
        }
		
        [DataMember]
        public string RegisterPerson
        {
            get { return Convert.ToString(GetData(RepProductRegisterTable.C_REGISTER_PERSON)); }
            set { SetData(RepProductRegisterTable.C_REGISTER_PERSON, value); }
        }
		
        [DataMember]
        public DateTime RegisterDate
        {
            get { return Convert.ToDateTime(GetData(RepProductRegisterTable.C_REGISTER_DATE)); }
            set { SetData(RepProductRegisterTable.C_REGISTER_DATE, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(RepProductRegisterTable.C_REMARK)); }
            set { SetData(RepProductRegisterTable.C_REMARK, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(RepProductRegisterTable.C_CREATED_DATE)); }
            set { SetData(RepProductRegisterTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(RepProductRegisterTable.C_CREATED_BY)); }
            set { SetData(RepProductRegisterTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(RepProductRegisterTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(RepProductRegisterTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        [DataMember]
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(RepProductRegisterTable.C_LAST_MODIFIED_BY)); }
            set { SetData(RepProductRegisterTable.C_LAST_MODIFIED_BY, value); }
        }
		
        [DataMember]
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(RepProductRegisterTable.C_APPROVED_DATE)); }
            set { SetData(RepProductRegisterTable.C_APPROVED_DATE, value); }
        }
		
        [DataMember]
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(RepProductRegisterTable.C_APPROVED_BY)); }
            set { SetData(RepProductRegisterTable.C_APPROVED_BY, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(RepProductRegisterTable.C_STATUS)); }
            set { SetData(RepProductRegisterTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

